package com.xhsj.user.hr.userInfo.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhsj.user.hr.userInfo.dto.AllContractListDto;
import com.xhsj.user.hr.userInfo.query.ContractListQuery;
import org.apache.ibatis.annotations.Mapper;
import com.xhsj.user.hr.userInfo.entity.TbGlobalUserContract;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * <p>
 * 用户-合同信息表 Mapper 接口
 * </p>
 *
 * @author liuqinghua
 * @since 2020-09-08
 */
@Mapper
public interface TbGlobalUserContractMapper extends BaseMapper<TbGlobalUserContract> {

    /**
     * 所有合同列表
     * @author liuqinghua
     * @date Sep 8, 2020 10:01:11 AM
     */
    IPage<ContractListQuery> getAllContractList(Page<ContractListQuery> page,@Param("data") AllContractListDto data);

    /**
     * 我的合同列表
     * @author liuqinghua
     * @date Sep 8, 2020 10:01:11 AM
     */
    IPage<ContractListQuery> getMyContractList(Page<ContractListQuery> page,@Param("userId") Long userId,@Param("data") AllContractListDto data);

    /**
     * 我的合同列表
     * @author liuqinghua
     * @date Sep 8, 2020 10:01:11 AM
     */
    List<ContractListQuery> getContractList(@Param("userId") Long userId);

    /**
     * 获取最大批次
     * @author liuqinghua
     * @date Sep 8, 2020 10:01:11 AM
     */
    int getMaxContractBatch(@Param("userId") Long userId);
}
